package com.game.admin.job.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.Date;

/**
 * @author 不愿透露
 * @Classname RecordListVo
 * @Description TODO
 * @Date 2021/12/24 15:31
 */
@Data
public class RecordListVo {
    private String name;
    private String address;
    private String lat;
    private String lng;
    private String tel;
    private String notice;
    private Integer method;
    private String platform;
    private String startTime;
    private String minge;
    private String count;
    private String url;
    private String course;
    private Integer recordType;
    private Integer infoType;
    private Integer sourceType;
    private String remark;
    private Date createTime;
    private String province;
    private String city;
    private String code;
    private String depaVaccId;
    @Override
    public boolean equals(Object obj){
        /** 对象是 null 直接返回 false **/
        if (obj == null) {
            return false;
        }
        /** 对象是当前对象，直接返回 true **/
        if (this == obj) {
            return true;
        }
        /** 判断对象类型是否是User **/
        if (obj instanceof RecordListVo) {
            RecordListVo vo = (RecordListVo) obj;
            /** 比较每个属性的值一致时才返回true **/
            /** 有几个对象就要比较几个属性 **/
            if (vo.name.equals(this.name)) {
                if(vo.startTime ==null && this.startTime == null){
                    return true;
                }
                if(vo.startTime.equals(this.startTime)) {
                    return true;
                }
            }
        }
        return false;
    }

    /**
     * 重写hashcode方法，返回的hashCode一样才再去比较每个属性的值
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + this.infoType;
        result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
        return result;
    }

}
